<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<title></title>
<link href="__PUBLIC__/meadmin/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/meadmin/assets/css/main.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/meadmin/assets/css/plugins.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/meadmin/assets/css/responsive.css" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/meadmin/assets/css/icons.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/meadmin/assets/css/login.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="__PUBLIC__/meadmin/assets/css/fontawesome/font-awesome.min.css">
<!--[if IE 7]>
<link rel="stylesheet" href="__PUBLIC__/meadmin/assets/css/fontawesome/font-awesome-ie7.min.css">
<![endif]-->
<!--[if IE 8]>
<link href="__PUBLIC__/meadmin/assets/css/ie8.css" rel="stylesheet" type="text/css" />
<![endif]-->
<script type="text/javascript" src="__PUBLIC__/meadmin/assets/js/libs/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/meadmin/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/meadmin/assets/js/libs/lodash.compat.min.js"></script>
<!--[if lt IE 9]>
<script src="__PUBLIC__/meadmin/assets/js/libs/html5shiv.js"></script>
<![endif]-->
<script type="text/javascript" src="__PUBLIC__/meadmin/plugins/uniform/jquery.uniform.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/meadmin/plugins/validation/jquery.validate.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/meadmin/plugins/nprogress/nprogress.js"></script>
<script type="text/javascript" src="__PUBLIC__/meadmin/assets/js/login.js"></script>
<script type="text/javascript" src="__PUBLIC__/meadmin/plugins/bootbox/bootbox.min.js"></script>
<script>
      $(document).ready(function() {
        Login.init()
      });
</script>
</head>
<body class="login">
<div class="logo"> <img src="__PUBLIC__/meadmin/assets/img/logo.png" alt="logo" /> <strong> 后台登录</strong></div>
<div class="box">
  <div class="content">
    <form class="form-vertical login-form" action="<{:U('Public/login')}>" method="post">
      <h3 class="form-title"> 登录 </h3>
      <div class="alert fade in alert-danger" style="display: none;"> <i class="icon-remove close" data-dismiss="alert"> </i> 输入任何用户名密码进入. </div>
      <div class="form-group">
        <div class="input-icon"> <i class="icon-user"> </i>
          <input type="text" name="username" class="form-control" placeholder="用户名"
              autofocus="autofocus" data-rule-required="true" data-msg-required="请输入用户名."
              />
        </div>
      </div>
      <div class="form-group">
        <div class="input-icon"> <i class="icon-lock"> </i>
          <input type="password" name="password" class="form-control" placeholder="密码"
              data-rule-required="true" data-msg-required="请输入密码."
              />
        </div>
      </div>
      <div class="form-actions">
        <label class="checkbox pull-left">
          <input type="checkbox" class="uniform" name="remember">
          记住密码 </label>
        <button type="submit" class="submit btn btn-primary pull-right"> 登录 <i class="icon-angle-right"> </i> </button>
      </div>
    </form>
    <form class="form-vertical register-form" action="#" method="post"
        style="display: none;">
      <h3 class="form-title"> 免费注册 </h3>
      <div class="form-group">
        <div class="input-icon"> <i class="icon-user"> </i>
          <input type="text" name="username" class="form-control" placeholder="Username"
              autofocus="autofocus" data-rule-required="true" />
        </div>
      </div>
      <div class="form-group">
        <div class="input-icon"> <i class="icon-lock"> </i>
          <input type="password" name="password" class="form-control" placeholder="Password"
              id="register_password" data-rule-required="true" />
        </div>
      </div>
      <div class="form-group">
        <div class="input-icon"> <i class="icon-ok"> </i>
          <input type="password" name="password_confirm" class="form-control" placeholder="Confirm Password"
              data-rule-required="true" data-rule-equalTo="#register_password" />
        </div>
      </div>
      <div class="form-group">
        <div class="input-icon"> <i class="icon-envelope"> </i>
          <input type="text" name="Email" class="form-control" placeholder="Email address"
              data-rule-required="true" data-rule-email="true" />
        </div>
      </div>
      <div class="form-group spacing-top">
        <label class="checkbox">
          <input type="checkbox" class="uniform" name="remember" data-rule-required="true"
              data-msg-required="Please accept ToS first.">
          I agree to the <a href="javascript:void(0);"> Terms of Service </a> </label>
        <label for="remember" class="has-error help-block" generated="true" style="display:none;"> </label>
      </div>
      <div class="form-actions">
        <button type="button" class="back btn btn-default pull-left"> <i class="icon-angle-left"> </i> Back </i> </button>
        <button type="submit" class="submit btn btn-primary pull-right"> Sign Up <i class="icon-angle-right"> </i> </button>
      </div>
    </form>
  </div>
<script type="text/javascript">
  if (location.host == "envato.stammtec.de" || location.host == "themes.stammtec.de") {
    var _paq = _paq || [];
    _paq.push(["trackPageView"]);
    _paq.push(["enableLinkTracking"]); (function() {
      var a = (("https:" == document.location.protocol) ? "https": "http") + "://analytics.stammtec.de/";
      _paq.push(["setTrackerUrl", a + "piwik.php"]);
      _paq.push(["setSiteId", "17"]);
      var e = document,
      c = e.createElement("script"),
      b = e.getElementsByTagName("script")[0];
      c.type = "text/javascript";
      c.defer = true;
      c.async = true;
      c.src = a + "piwik.js";
      b.parentNode.insertBefore(c, b)
    })()
  };
	  
	$('.login-form button').click(function(){
    var data = $('.login-form').serialize();
		var url = $('.login-form').attr('action') ;
		var url2 = "<{:U('index/index')}>";
		
		$.post(url,data,function(e){
	    if(e.status == 1){
		    mAlert(e.msg);
				window.location.href=url2;
				return false;	
			}else{
		    mAlert(e.msg);
				return false;	
			}	
		},'json')	
		return false;  
  })
	
	
		//弹窗
	function mAlert(msg){
    bootbox.alert(msg,
    function() {
       console.log("")
    })
	}
	  
</script>
</body>
</html>